Skip to content

Feature/564 open objecten#713

Open
Floris272 wants to merge 15 commits intomasterfrom
feature/564-open-objecten
Open

Feature/564 open objecten#713
Floris272 wants to merge 15 commits intomasterfrom
feature/564-open-objecten

Conversation

@Floris272
Copy link
Contributor

@Floris272 Floris272 commented Dec 24, 2025

Fixes #564

Changes

  • fully integrates objecttypes api into objects api
  • removes code used for fetching external objecttypes
  • adds upgrade check to make sure all objecttypes are imported

TODO

  • docs. install & readme

@github-actions
Copy link
Contributor

github-actions bot commented Dec 24, 2025

🐰 Bencher Report

Branchfeature/564-open-objecten
Testbedubuntu-latest

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
performance_test/tests/test_objects_list.py::test_objects_api_list_large_page_size_page_1Latency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
417.18 ms
(+16.55%)Baseline: 357.94 ms
375.84 ms
(111.00%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
performance_test/tests/test_objects_list.py::test_objects_api_list_filter_by_object_type📈 view plot
🚷 view threshold
123.40 ms
(+0.64%)Baseline: 122.61 ms
128.74 ms
(95.85%)
performance_test/tests/test_objects_list.py::test_objects_api_list_filter_one_result📈 view plot
🚷 view threshold
20.25 ms
(-8.44%)Baseline: 22.11 ms
23.22 ms
(87.20%)
performance_test/tests/test_objects_list.py::test_objects_api_list_large_page_size_page_1📈 view plot
🚷 view threshold
🚨 view alert (🔔)
417.18 ms
(+16.55%)Baseline: 357.94 ms
375.84 ms
(111.00%)

performance_test/tests/test_objects_list.py::test_objects_api_list_large_page_size_page_5📈 view plot
🚷 view threshold
330.04 ms
(+4.94%)Baseline: 314.49 ms
330.22 ms
(99.95%)
performance_test/tests/test_objects_list.py::test_objects_api_list_small_page_size_page_20📈 view plot
🚷 view threshold
126.69 ms
(-2.71%)Baseline: 130.22 ms
136.73 ms
(92.66%)
🐰 View full continuous benchmarking report in Bencher

@Floris272 Floris272 force-pushed the feature/564-open-objecten branch from 273b407 to 587f7e5 Compare January 7, 2026 13:24
@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2026

Codecov Report

❌ Patch coverage is 96.86684% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.60%. Comparing base (6001c75) to head (d4e6f76).

Files with missing lines Patch % Lines
src/objects/utils/autoschema.py 33.33% 6 Missing ⚠️
src/objects/core/forms.py 89.18% 3 Missing and 1 partial ⚠️
src/objects/core/models.py 81.81% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #713      +/-   ##
==========================================
+ Coverage   84.92%   85.60%   +0.67%     
==========================================
  Files         141      144       +3     
  Lines        2832     3007     +175     
  Branches      222      236      +14     
==========================================
+ Hits         2405     2574     +169     
- Misses        375      381       +6     
  Partials       52       52              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

'1':
- record__data__leeftijd
- record__data__kiemjaar
# TODO
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the objecttype setup config thing but because of that you cannot really add permissions anymore, should it be added back and if yes only the required objecttype fields or everything?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for removing it? Is it because you can't create ObjectTypes now without specifying the JSON schema?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the original use case was to only set the name and service so that all versions with their json schema's will be accesible, then in a tokenauth fields can be specified.

After the objecttype move, we could keep it as just the name, but then specifying the tokenauth permission fields becomes weird because that the schema cannot be defined in in the setup conf.

So i would propose to either:

  • remove objecttypes from setup config.
  • add the bare minimum (name, name_plural is also required but can be derived) but remove the token auth permission fields.
  • add version and schema to objecttype config but i feel like objecttype versions should not be created like this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go for the second option for now

help_text=_("Incremental index number of the object record."),
)
object = models.ForeignKey(Object, on_delete=models.CASCADE, related_name="records")
version = models.PositiveSmallIntegerField(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version could become an FK?

@Floris272 Floris272 marked this pull request as ready for review January 8, 2026 10:56
@Floris272 Floris272 requested a review from stevenbal January 8, 2026 10:56
Copy link
Collaborator

@stevenbal stevenbal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall 👍

'1':
- record__data__leeftijd
- record__data__kiemjaar
# TODO
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for removing it? Is it because you can't create ObjectTypes now without specifying the JSON schema?

@stevenbal
Copy link
Collaborator

@Floris272 will you do the docs in a separate PR?

@stevenbal stevenbal mentioned this pull request Jan 26, 2026
16 tasks
@Floris272 Floris272 force-pushed the feature/564-open-objecten branch from b4b24a2 to d81a31c Compare January 27, 2026 14:27
Comment on lines -84 to -85
"service",
], # TODO remove service from unique_fields after objecttype migration since it will no longer be part of the ObjectType model.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Command could be kept, Objecttypes will just be unique on their uuid only

@Floris272
Copy link
Contributor Author

@Floris272 will you do the docs in a separate PR?

yes

@Floris272 Floris272 force-pushed the feature/564-open-objecten branch 2 times, most recently from 5a4d32e to d673439 Compare February 3, 2026 09:17
Copy link
Collaborator

@stevenbal stevenbal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small things remaining still, I'd recommend to split off the duplicate UUID stuff into a separate PR, because this PR has been open for quite a while already

'1':
- record__data__leeftijd
- record__data__kiemjaar
# TODO
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go for the second option for now

@Floris272 Floris272 force-pushed the feature/564-open-objecten branch 2 times, most recently from 5e51c56 to d9f47d4 Compare February 10, 2026 15:15
@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

🐰 Bencher Report

Branchfeature/564-open-objecten
Testbedubuntu-24.04

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
performance_test/tests/test_objects_list.py::test_objects_api_list_large_page_size_page_1Latency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
334.81 ms
(+5.38%)Baseline: 317.71 ms
333.60 ms
(100.36%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
performance_test/tests/test_objects_list.py::test_objects_api_list_filter_by_object_type📈 view plot
🚷 view threshold
124.34 ms
(+1.18%)Baseline: 122.89 ms
129.04 ms
(96.36%)
performance_test/tests/test_objects_list.py::test_objects_api_list_filter_one_result📈 view plot
🚷 view threshold
18.61 ms
(-7.12%)Baseline: 20.03 ms
21.04 ms
(88.46%)
performance_test/tests/test_objects_list.py::test_objects_api_list_large_page_size_page_1📈 view plot
🚷 view threshold
🚨 view alert (🔔)
334.81 ms
(+5.38%)Baseline: 317.71 ms
333.60 ms
(100.36%)

performance_test/tests/test_objects_list.py::test_objects_api_list_large_page_size_page_5📈 view plot
🚷 view threshold
327.65 ms
(+4.03%)Baseline: 314.95 ms
330.69 ms
(99.08%)
performance_test/tests/test_objects_list.py::test_objects_api_list_small_page_size_page_20📈 view plot
🚷 view threshold
125.48 ms
(-2.47%)Baseline: 128.66 ms
135.09 ms
(92.88%)
🐰 View full continuous benchmarking report in Bencher

@Floris272 Floris272 requested a review from stevenbal February 10, 2026 16:15
@stevenbal
Copy link
Collaborator

@Floris272 could you rebase on master to fix the merge conflicts?

@Floris272 Floris272 force-pushed the feature/564-open-objecten branch from d9f47d4 to d4e6f76 Compare February 13, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenObjecten - combine the ObjectsType API into the Objects API

3 participants